#ifndef KEYINPUTWIDGET_H
#define KEYINPUTWIDGET_H

#include <QWidget>

namespace Ui {
class KeyinputWidget;
}

class KeyinputWidget : public QWidget
{
    Q_OBJECT

public:
    explicit KeyinputWidget(QWidget *parent = nullptr);
    ~KeyinputWidget();

    QString getKeyinputString();
    void clearKeyinputString();
public slots:

    void onEyeClicked();
    void onEnterClicked();
    void onKeytextChanged();

    void setKeyinputLocked(bool locked = true);
    void setKeyinputLoading(bool isloadingAnimation = false);

protected:
    virtual bool eventFilter(QObject *obj, QEvent *event) override;

signals:
    void sigKeyEnter(const QString& passwd);


private:
    Ui::KeyinputWidget *ui;
    bool mPwdVisible = false;
};

#endif // KEYINPUTWIDGET_H
